<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
<!-- qtdesigner-overview.qdoc -->
  <title>Developing Widget Based Applications | Qt Creator Manual</title>
  <link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
  <script type="text/javascript">
    document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
    // loading style sheet breaks anchors that were jumped to before
    // so force jumping to anchor again
    setTimeout(function() {
        var anchor = location.hash;
        // need to jump to different anchor first (e.g. none)
        location.hash = "#";
        setTimeout(function() {
            location.hash = anchor;
        }, 0);
    }, 0);
  </script>
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="main">
    <div class="main-rounded">
      <div class="navigationbar">
        <table><tr>
<td ><a href="index.html">Qt Creator Manual</a></td><td >Developing Widget Based Applications</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right"><a href="index.html">Qt Creator Manual 4.11.1</a></td>
        </tr></table>
      </div>
    </div>
<div class="content">
<div class="line">
<div class="content mainContent">
  <link rel="prev" href="quick-converting-ui-projects.html" />
  <link rel="next" href="adding-plugins.html" />
<p class="naviNextPrevious headerNavi">
<a class="prevPage" href="quick-converting-ui-projects.html">Converting UI Projects to Applications</a>
<span class="naviSeparator">  &#9702;  </span>
<a class="nextPage" href="adding-plugins.html">Adding Qt Designer Plugins</a>
</p><p/>
<div class="sidebar">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#code-editor-integration">Code Editor Integration</a></li>
<li class="level1"><a href="#managing-image-resources">Managing Image Resources</a></li>
<li class="level1"><a href="#specifying-settings-for-qt-designer">Specifying Settings for Qt Designer</a></li>
<li class="level1"><a href="#previewing-forms-using-device-skins">Previewing Forms Using Device Skins</a></li>
<li class="level1"><a href="#adding-widgets">Adding Widgets</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">Developing Widget Based Applications</h1>
<span class="subtitle"></span>
<!-- $$$creator-using-qt-designer.html-description -->
<div class="descr"> <a name="details"></a>
<p>Qt Creator automatically opens all .ui files in the integrated Qt Designer, in <b>Design</b> mode.</p>
<p class="centerAlign"><img src="images/qtcreator-formedit.png" alt="" /></p><p>For more information about Qt Designer, see the <a href="http://doc.qt.io/qt-5/qtdesigner-manual.html">Qt Designer Manual</a>.</p>
<p>Generally, the integrated Qt Designer contains the same functions as the standalone Qt Designer. The following sections describe the differences.</p>
<a name="code-editor-integration"></a>
<h2 id="code-editor-integration">Code Editor Integration</h2>
<p>To switch between forms (<b>Design</b> mode) and code (<b>Edit</b> mode), press <b>Shift+F4</b>.</p>
<p>You can use Qt Creator to create stub implementations of slot functions. In the <b>Design</b> mode, right-click a widget to open a context menu, and then select <b>Go to Slot</b>. Select a signal in the list to go to an existing slot function or to create a new slot function.</p>
<a name="managing-image-resources"></a>
<h2 id="managing-image-resources">Managing Image Resources</h2>
<p>In standalone Qt Designer, image resources are created using the built-in <b>Resource Editor</b>. In Qt Creator, .ui files are usually part of a project, which may contain several resource files (.qrc). They are created and maintained by using the Qt Creator Resource Editor. The Qt Designer <b>Resource Editor</b> is de-activated and the image resources are displayed in the Qt Designer <b>Resource Browser</b>.</p>
<a name="specifying-settings-for-qt-designer"></a>
<h2 id="specifying-settings-for-qt-designer">Specifying Settings for Qt Designer</h2>
<p>You can drag and drop the views in Qt Designer to new positions on the screen.</p>
<p>To specify settings for Qt Designer:</p>
<ul>
<li>Select <b>Tools</b> &gt; <b>Options</b> &gt; <b>Designer</b>.</li>
<li>Specify settins for generating classes and code in <b>Class Generation</b>.</li>
<li>Specify embedded device profiles, that determine style, font, and screen resolution, for example, in <b>Embedded Design</b>.</li>
<li>Specify settings for the grid and previewing forms in <b>Forms</b>.</li>
<li>Specify an additional folder for saving templates in <b>Template Paths</b>.</li>
</ul>
<p>To preview the settings, select <b>Tools</b> &gt; <b>Form Editor</b> &gt; <b>Preview</b>, or press <b>Alt+Shift+R</b>.</p>
<a name="previewing-forms-using-device-skins"></a>
<h2 id="previewing-forms-using-device-skins">Previewing Forms Using Device Skins</h2>
<p>A <i>device skin</i> is a set of configuration files that describe a mobile device. It includes a border image that surrounds the form and depicts a mobile device with its buttons.</p>
<p>To preview your form using device skins:</p>
<ol class="1" type="1"><li>Select <b>Tools</b> &gt; <b>Options</b> &gt; <b>Designer</b>.</li>
<li>Select the <b>Print/Preview Configuration</b> check box.</li>
<li>In the <b>Device skin</b> field, select a device skin.</li>
<li>When the form is open in <b>Design</b> mode, press <b>Alt+Shift+R</b>.</li>
<li>To end the preview, right-click the skin and select <b>Close</b> in the context menu.</li>
</ol>
<a name="adding-widgets"></a>
<h2 id="adding-widgets">Adding Widgets</h2>
<p>You can use Qt APIs to create plugins that extend Qt applications. This enables you to add your own widgets to Qt Designer. For more information, see <a href="adding-plugins.html">Adding Qt Designer Plugins</a>.</p>
</div>
<!-- @@@creator-using-qt-designer.html -->
<p class="naviNextPrevious footerNavi">
<a class="prevPage" href="quick-converting-ui-projects.html">Converting UI Projects to Applications</a>
<span class="naviSeparator">  &#9702;  </span>
<a class="nextPage" href="adding-plugins.html">Adding Qt Designer Plugins</a>
</p>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2019 The Qt Company Ltd.
   Documentation contributions included herein are the copyrights of
   their respective owners.<br>    The documentation provided herein is licensed under the terms of the    <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation    License version 1.3</a> as published by the Free Software Foundation.<br>    Qt and respective logos are trademarks of The Qt Company Ltd.     in Finland and/or other countries worldwide. All other trademarks are property
   of their respective owners. </p>
</div>
</body>
</html>
